Skip to content

[DOCS] Document thread_pool node stats #50330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 18, 2019
Merged

[DOCS] Document thread_pool node stats #50330

merged 3 commits into from
Dec 18, 2019

Conversation

jrodewig
Copy link
Contributor

Documents the thread_pool parameters returned by the _nodes/stats API.

Documents the `thread_pool` parameters returned by the `_nodes/stats`
API.
@jrodewig jrodewig added >docs General docs changes :Data Management/Stats Statistics tracking and retrieval APIs v8.0.0 v7.6.0 v7.5.2 labels Dec 18, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Stats)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@jbaiera jbaiera self-requested a review December 18, 2019 21:01
Copy link
Member

@jbaiera jbaiera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of questions, the main one being about thread pool names.

Comment on lines 901 to 923
`thread_pool.analyze.threads`::
(integer)
Number of threads in the `analyze` thread pool.

`thread_pool.analyze.queue`::
(integer)
Number of tasks in queue for the `analyze` thread pool.

`thread_pool.analyze.active`::
(integer)
Number of active threads in the `analyze` thread pool.

`thread_pool.analyze.rejected`::
(integer)
Number of tasks rejected by the `analyze` thread pool executor.

`thread_pool.analyze.largest`::
(integer)
Highest number of active threads in the `analyze` thread pool.

`thread_pool.analyze.completed`::
(integer)
Number of tasks completed by the `analyze` thread pool executor.
Copy link
Member

@jbaiera jbaiera Dec 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good way from a writing perspective to parameterize these statistics? I bring this up because any plugin can create and name its own thread pools, which are added to the statistics output automatically if it's the correct type. The stats mean the same thing across every threadpool that can be returned so it should cut down on reading effort, as well as trying to maintain this list for every thread pool we add.

Copy link
Contributor Author

@jrodewig jrodewig Dec 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could do something like thread_pool.<thread_pool_name>.threads. We did something similar in the ingest section:
https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html#cluster-nodes-stats-api-response-body-ingest

I was debating this initially, but I decided to go with the current format because users might be searching for a specific thread pool name. However, I wasn't aware that this API would also pick up thread pools from plugins, which makes that direction kind of moot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with 00ae054.

After looking at the preview, I decided against adding a default list and just letting the <thread_pool_name> placeholder stand as-is.

Also updated the ingest section to use snake_case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...users might be searching for a specific thread pool name

You could also potentially add the default thread pools names to the reference, but I think that sort of information is probably better documented elsewhere and linked to. Different thread pools often have a wide array of uses, which sometimes don't make sense without some decent explanation. It feels like it might be a bit much for a reference section.

@jrodewig jrodewig requested a review from jbaiera December 18, 2019 21:37
Copy link
Member

@jbaiera jbaiera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jrodewig jrodewig merged commit b8a62ce into elastic:master Dec 18, 2019
@jrodewig jrodewig deleted the add-threadpool-node-stats branch December 18, 2019 21:57
jrodewig added a commit that referenced this pull request Dec 18, 2019
jrodewig added a commit that referenced this pull request Dec 18, 2019
@jrodewig
Copy link
Contributor Author

master: b8a62ce
7.x: 73ca2e5
7.5: d86704a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Stats Statistics tracking and retrieval APIs >docs General docs changes v7.5.2 v7.6.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants